<template>
  <div>
      <button @click="onClick">弹出框</button>
      <IDialog :dialogData="dialogData">
            <span>我是弹窗 slot添加弹窗内容</span>
      </IDialog>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { IDialog } from '@/entry.esm'
import { DialogDataInterface } from '@/IDialog/src/IDialogInterFace'
// import { SeniorSearchInterFace } from '@/ISeniorSearch/src/ISeniorSearchInterface'
export default defineComponent({
  name: 'app',
  setup () {
    const dialogData = reactive<DialogDataInterface>({
      width: 800, // 弹框宽度
      show: false, // 弹框是否展示
      title: '弹窗标题', // 弹框名字
      onSubmit: () => {
        dialogData.onCancel && dialogData.onCancel()
      },
      onCancel: () => {
        dialogData.show = false
      }
    })
    const onClick = () => {
      dialogData.show = true
    }
    return {
      onClick,
      dialogData
    }
  },
  components: {
    IDialog
  }
})
</script>
